Skip to content

Conversation

@koke
Copy link
Member

@koke koke commented Nov 7, 2022

Description

After some In-app Purchases testing, I noticed some confusion with the information shown by the IAP debug screen. This PR adds a couple of improvements:

  • Disable the purchase button while a purchase is in progress. Since iOS takes a few seconds to show any UI, and there was nothing else shown while communicating with WordPress.com servers, it wasn't clear when the process ended. Now it shows an activity indicator instead of the button while making a purchase.
  • Update entitlements more consistently. Previously, the screen loaded the current entitlements when loading products, but didn't update correctly when a purchase was made or a subscription expired unless you reloaded products manually. Now it updates in those cases.

Testing instructions

  1. Go to Hub Menu > IAP Debug
  2. Purchase a monthly subscription. Notice the button is replaced by an activity indicator until the process finishes.
  3. Once the subscription purchase is complete, the button should be back and show "Entitled"
  4. Go to iOS Settings > App Store > Manage sandbox account and cancel the subscription
  5. Wait a few minutes until the subscription expires and go back to the app
  6. The button shouldn't show Entitled anymore. If the subscription hasn't expired yet, sending the app to the background and open again should reload the entitlements.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8051-982a1ac on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@koke koke added the feature: in-app purchases Related to In-app purchases and subscriptions label Nov 7, 2022
@koke koke added this to the 11.2 milestone Nov 7, 2022
@koke koke requested a review from toupper November 7, 2022 15:21
@koke koke marked this pull request as ready for review November 7, 2022 15:21
@toupper
Copy link
Contributor

toupper commented Nov 7, 2022

This is great! The testing experience is now much clearer. LGTM :shipit:

@koke koke merged commit 7b905f4 into trunk Nov 8, 2022
@koke koke deleted the iap-debug-improvements branch November 8, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: in-app purchases Related to In-app purchases and subscriptions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants